package com.ysyx.ysyx_driverinfo.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 司机信息表
 * @TableName driver_inf
 */
@TableName(value ="driver_inf")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DriverPojo implements Serializable {
    /**
     * 司机id
     */
    @TableId(type = IdType.AUTO)
    private Integer driverId;

    /**
     * 司机账号
     */
    private String driverAcc;

    /**
     * 司机密码
     */
    private String driverPwd;

    /**
     * 司机姓名
     */
    private String driverName;

    /**
     * 司机身份证号
     */
    private String driverIdno;

    /**
     * 司机手机号
     */
    private String driverTel;

    /**
     * 司机头像
     */
    private String driverAvatar;

    /**
     * 身份证照片
     */
    private String driverIdnoimg;

    /**
     * 司机注册时间
     */
    private Date driverCtime;

    /**
     * 审核状态(101司机未提交审核、201司机已提交待审核、202司机审核通过、301司机审核不通过、401司机重新提交审核)
     */
    private Integer driverPassstate;

    /**
     * 账号状态(101正常、201封禁)
     */
    private Integer driverState;

    /**
     * 司机待提现余额
     */
    private Double driverWallet;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DriverPojo other = (DriverPojo) that;
        return (this.getDriverId() == null ? other.getDriverId() == null : this.getDriverId().equals(other.getDriverId()))
            && (this.getDriverAcc() == null ? other.getDriverAcc() == null : this.getDriverAcc().equals(other.getDriverAcc()))
            && (this.getDriverPwd() == null ? other.getDriverPwd() == null : this.getDriverPwd().equals(other.getDriverPwd()))
            && (this.getDriverName() == null ? other.getDriverName() == null : this.getDriverName().equals(other.getDriverName()))
            && (this.getDriverIdno() == null ? other.getDriverIdno() == null : this.getDriverIdno().equals(other.getDriverIdno()))
            && (this.getDriverTel() == null ? other.getDriverTel() == null : this.getDriverTel().equals(other.getDriverTel()))
            && (this.getDriverAvatar() == null ? other.getDriverAvatar() == null : this.getDriverAvatar().equals(other.getDriverAvatar()))
            && (this.getDriverIdnoimg() == null ? other.getDriverIdnoimg() == null : this.getDriverIdnoimg().equals(other.getDriverIdnoimg()))
            && (this.getDriverCtime() == null ? other.getDriverCtime() == null : this.getDriverCtime().equals(other.getDriverCtime()))
            && (this.getDriverPassstate() == null ? other.getDriverPassstate() == null : this.getDriverPassstate().equals(other.getDriverPassstate()))
            && (this.getDriverState() == null ? other.getDriverState() == null : this.getDriverState().equals(other.getDriverState()))
            && (this.getDriverWallet() == null ? other.getDriverWallet() == null : this.getDriverWallet().equals(other.getDriverWallet()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDriverId() == null) ? 0 : getDriverId().hashCode());
        result = prime * result + ((getDriverAcc() == null) ? 0 : getDriverAcc().hashCode());
        result = prime * result + ((getDriverPwd() == null) ? 0 : getDriverPwd().hashCode());
        result = prime * result + ((getDriverName() == null) ? 0 : getDriverName().hashCode());
        result = prime * result + ((getDriverIdno() == null) ? 0 : getDriverIdno().hashCode());
        result = prime * result + ((getDriverTel() == null) ? 0 : getDriverTel().hashCode());
        result = prime * result + ((getDriverAvatar() == null) ? 0 : getDriverAvatar().hashCode());
        result = prime * result + ((getDriverIdnoimg() == null) ? 0 : getDriverIdnoimg().hashCode());
        result = prime * result + ((getDriverCtime() == null) ? 0 : getDriverCtime().hashCode());
        result = prime * result + ((getDriverPassstate() == null) ? 0 : getDriverPassstate().hashCode());
        result = prime * result + ((getDriverState() == null) ? 0 : getDriverState().hashCode());
        result = prime * result + ((getDriverWallet() == null) ? 0 : getDriverWallet().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", driverId=").append(driverId);
        sb.append(", driverAcc=").append(driverAcc);
        sb.append(", driverPwd=").append(driverPwd);
        sb.append(", driverName=").append(driverName);
        sb.append(", driverIdno=").append(driverIdno);
        sb.append(", driverTel=").append(driverTel);
        sb.append(", driverAvatar=").append(driverAvatar);
        sb.append(", driverIdnoimg=").append(driverIdnoimg);
        sb.append(", driverCtime=").append(driverCtime);
        sb.append(", driverPassstate=").append(driverPassstate);
        sb.append(", driverState=").append(driverState);
        sb.append(", driverWallet=").append(driverWallet);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
